home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 1: Comms & Networking / Almathera Ten on Ten - Disc 1: Comms & Networking.iso / amiga-useful / perl / faq / 3.5_programmingaids < prev    next >
Encoding:
Text File  |  1995-05-04  |  23.4 KB  |  571 lines

  1. Newsgroups: comp.lang.perl,comp.answers,news.answers
  2. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!hookup!news.kei.com!news.mathworks.com!news2.near.net!howland.reston.ans.net!news.sprintlink.net!ddi2.digital.net!vx!usenet!spp
  3. From: spp@vx.com
  4. Subject: comp.lang.perl FAQ 3/5 - Programming Aids
  5. Message-ID: <SPP.95Apr4140941@squid.vx.com>
  6. Followup-To: poster
  7. Sender: usenet@vx.com
  8. Nntp-Posting-Host: squid
  9. Organization: Varimetrix Corporation
  10. Date: Tue, 4 Apr 1995 18:09:41 GMT
  11. Approved: news-answers-request@MIT.EDU
  12. Lines: 556
  13. Xref: senator-bedfellow.mit.edu comp.lang.perl:47091 comp.answers:11037 news.answers:41334
  14.  
  15. Archive-name: perl-faq/part3
  16. Version: $Id: part3,v 2.5 1995/04/04 16:39:49 spp Exp spp $
  17. Posting-Frequency: bi-weekly
  18. Change-Log: $Log: part3,v $
  19. # Revision 2.5  1995/04/04  16:39:49  spp
  20. # 03/19/95 -  Updated 3.7 (perl shell) information.
  21. # 03/23/95 -  Updated 3.9 (perl w/X) about Tk
  22. #
  23. # Revision 2.4  1995/03/17  16:47:15  spp
  24. # 02/21/95 -  Fixed typos
  25. # 03/15/95 -  Modified 3.4 to have a more descriptive title.
  26. #
  27. # Revision 2.3  1995/01/31  14:45:08  spp
  28. # 12/13/94 -  Modified section on using menu.pl with perl 5.000.
  29. # 01/23/95 -  Modified section on using menu.pl with perl 5.000.
  30. # 01/30/95 -  Serious rewrite of 3.5) perl - to - C/binary
  31. #
  32.  
  33.  
  34. This posting contains answers to general information questions, mostly
  35. about programming aids.  
  36.  
  37.  
  38. 3.1) How can I use Perl interactively?
  39.     
  40.     The easiest way to do this is to run Perl under its debugger.  If you
  41.     have no program to debug, you can invoke the debugger on an `empty'
  42.     program like this: 
  43.  
  44.         perl -de 0
  45.  
  46.     (The more positive hackers prefer "perl -de 1". :-)
  47.  
  48.     Now you can type in any legal Perl code, and it will be immediately
  49.     evaluated.  You can also examine the symbol table, get stack
  50.     backtraces, check variable values, and if you want to, set breakpoints
  51.     and do the other things you can do in a symbolic debugger. 
  52.  
  53.  
  54. 3.2) Is there a Perl profiler?
  55.  
  56.     While there isn't one included with the perl source distribution (yet) 
  57.     various folks have written packages that allow you to do at least some 
  58.     sort of profiling.  The strategy usually includes modifying the perl 
  59.     debugger to handle profiling.  Authors of these packages include 
  60.  
  61.     Wayne Thompson         <me@anywhere.EBay.Sun.COM>
  62.     Ray Lischner         <lisch@sysserver1.mentor.com>
  63.     Kresten Krab Thorup     <krab@iesd.auc.dk>  
  64.  
  65.     The original articles by these folks containing their profilers are
  66.     available on convex.com in /pub/perl/information/profiling.shar via
  67.     anon ftp. 
  68.  
  69.  
  70. 3.3) Is there a yacc for Perl?
  71.  
  72.     Yes!! It's a version of Berkeley yacc that outputs Perl code instead
  73.     of C code!  You can get this from ftp.sterling.com [192.124.9.1] in
  74.     /local/perl-byacc1.8.2.tar.Z, or send the author mail for details.
  75.  
  76.  
  77. 3.4) Is there a pretty-printer (similar to indent(1)) for Perl?
  78.  
  79.     That depends on what you mean.  If you want something that works like
  80.     vgrind on Perl programs, then the answer is "yes, nearly".  Here's a
  81.     vgrind entry for perl: 
  82.  
  83.     PERL|perl|Perl:\
  84.         :pb=^\d?(sub|package)\d\p\d:\
  85.         :bb={:be=}:cb=#:ce=$:sb=":se=\e":lb=':\
  86.         :le=\e':tl:\
  87.         :id=_:\
  88.         :kw=\
  89.         if for foreach unless until while continue else elsif \
  90.         do eval require \
  91.         die exit \
  92.         defined delete reset \
  93.         goto last redo next dump \
  94.         local undef return  \
  95.         write format  \
  96.         sub package
  97.  
  98.     It doesn't actually do everything right; in particular, 
  99.     things like $#, $', s#/foo##, and $foo'bar all confuse it.
  100.  
  101.     David Levine uses this:
  102.  
  103.     # perl 4.x                    David Levine <levine@ics.uci.edu> 05 apr 1993
  104.     # Derived from Tom Christiansen's perl vgrindef.  I'd like to treat all  of
  105.     # perl's built-ins as  keywords,  but vgrind   fields are  limited  to 1024
  106.     # characters  and the built-ins overflow that (surprise  :-).  So, I didn't
  107.     # include the dbm*, end*, get*, msg*, sem*, set*,  and  shm* functions.   I
  108.     # couldn't come up with an easy way to  distinguish beginnings  of literals
  109.     # ('...') from package prefixes, so literals are not marked.
  110.     # Be sure to:
  111.     # 1) include whitespace between a subprogram name and its opening {
  112.     # 2) include whitespace before a comment (so that $# doesn't get
  113.     # interpreted as one).
  114.     perl4:\
  115.         :pb=^\d?(sub|package)\d\p\d:\
  116.         :id=$%@_:\
  117.         :bb=\e{:be=\e}:cb=\d\e#:ce=$:sb=\e":se=\e":\
  118.         :kw=accept alarm atan2 bind binmode caller chdir chmod chop \
  119.     chown chroot close closedir connect continue cos crypt defined delete \
  120.     die do dump each else elsif eof eval exec exit exp fcntl fileno flock \
  121.     for foreach fork format getc gmtime goto grep hex if include index int \
  122.     ioctl join keys kill last length link listen local localtime log lstat \
  123.     m mkdir next oct open opendir ord pack package pipe pop print printf \
  124.     push q qq qx rand read readdir readlink recv redo rename require reset \
  125.     return reverse rewinddir rindex rmdir s scalar seek seekdir select send \
  126.     shift shutdown sin sleep socket socketpair sort splice split sprintf \
  127.     sqrt srand stat study sub substr symlink syscall sysread system \
  128.     syswrite tell telldir time times tr truncate umask undef unless unlink \
  129.     unpack unshift until utime values vec wait waitpid wantarray warn while \
  130.     write y: 
  131.  
  132.     If what you mean is whether there is a program that will reformat the
  133.     program much as indent(1) will do for C, then the answer is no.  The
  134.     complex feedback between the scanner and the parser (as in the things
  135.     that confuse vgrind) make it challenging at best to write a stand-alone
  136.     Perl parser. 
  137.  
  138.     Of course, if you follow the guidelines in perlstyle(1), you shouldn't
  139.     need to reformat.
  140.  
  141.  
  142. 3.5) How can I convert my perl scripts directly to C or compile them into
  143.      binary form?
  144.  
  145.     The short answer is: "No, you can't compile perl into C.  Period."
  146.  
  147.     However, having said that, it is believed that it would be possible to
  148.     write a perl to C translator, although it is a PhD thesis waiting to
  149.     happen.  Anyone need a good challenging thesis?
  150.  
  151.     In the way of further, detailed explication, it seems that the reasons
  152.     people want to do this usaully break down into one or more of the
  153.     following:
  154.  
  155.     A) speed
  156.     B) secrecy
  157.     C) maintainability
  158.  
  159.     SPEED:
  160.  
  161.     1)    You can't turn perl source code or perl intermediary code into
  162.     native machine code to make it run faster, and saving the perl
  163.     intermediary code doesn't really buy you as much as you'd like.
  164.     If you really must, check out the undump and unexec alternatives.
  165.     If your motivations are speed, then this may or may not help you
  166.     much.  
  167.  
  168.     You might also look into autoloading functions on the fly, which
  169.     can greatly reduce start-up time.
  170.  
  171.     If you have a few routines that are bogging you down, you just
  172.     possibly might wish to hand-translate just them into C, then
  173.     dynamically load these in.  See perlapi(1) for details.  Most
  174.     of the time, however, reorganizing your perl algorithm is the best
  175.     way to address this.
  176.  
  177.  
  178.     SOURCE-CODE SECRECY:
  179.  
  180.     2)  If you're trying to stop people from seeing what you're doing,
  181.     you can shroud it, i.e. turn all the idents into silly stuff, 
  182.     rearrange strings, and remove redundant white space.  There's
  183.     a program out there called ShroudIt! that works on Perl,
  184.     but I lost my pointer to it.
  185.  
  186.     3)  You might also look into the cryptswitch() stuff in the perl
  187.         source, which would allow you to ship something in a form they
  188.         can't read.  This isn't particulary well-documented.
  189.  
  190.     4)  If you're worried about them using your software without licence,
  191.     you put some huge disclaimer at the top that says something like
  192.     the following.  This is actually the best solution, because only a
  193.     legal solution will really work if legality is what you're worried
  194.     about: trying to solve legal problems with technical solutions
  195.     is not worth the effort, and too easily circumvented.
  196.  
  197.         This is UNPUBLISHED PROPRIETARY SOURCE CODE of XYZZY, Inc.; the
  198.         contents of this file may not be disclosed to third parties,
  199.         copied or duplicated in any form, in whole or in part, without
  200.         the prior written permission of XYZZY, Inc.
  201.  
  202.         Permission is hereby granted soley to the licencee for use of
  203.         this source code in its unaltered state.  This source code may
  204.         not be modified by licencee except under direction of XYZZY
  205.         Inc.  Neither may this source code be given under any
  206.         circumstances to non-licensees in any form, including source
  207.         or binary.  Modification of this source constitutes breach of
  208.         contract, which voids any potential pending support
  209.         responsibilities by XYZZY Inc.  Divulging the exact or
  210.         paraphrased contents of this source code to unlicensed parties
  211.         either directly or indirectly constitutes violation of federal
  212.         and international copyright and trade secret laws, and will be
  213.         duly prosecuted to the fullest extent permitted under law.
  214.  
  215.         This software is provided by XYZZY Inc. ``as is'' and any
  216.         express or implied warranties, including, but not limited to,
  217.         the implied warranties of merchantability and fitness for a
  218.         particular purpose are disclaimed.  In no event shall the
  219.         regents or contributors be liable for any direct, indirect,
  220.         incidental, special, exemplary, or consequential damages
  221.         (including, but not limited to, procurement of substitute
  222.         goods or services; loss of use, data, or profits; or business
  223.         interruption) however caused and on any theory of liability,
  224.         whether in contract, strict liability, or tort (including
  225.         negligence or otherwise) arising in any way out of the use of
  226.         this software, even if advised of the possibility of such
  227.         damage.
  228.  
  229.     MAINTAINABILITY:
  230.  
  231.     5)  If you just want to stop people from changing it because you're
  232.     concerned about support issues, you can put in a big disclaimer at
  233.     the top that says that if they touch the file they void the
  234.     warranty, and then make them give you a size, checksum, and
  235.     version of the file before answering any questions about it.
  236.  
  237.     If you maintain a central site that distributes software to
  238.     internal client machines, use rdist(1) to send around a proper
  239.     version periodically, perhaps using the -y option on the install
  240.     to flag destinations younger than the source.
  241.  
  242.     Let it be noted than in the many, many years that Perl's author
  243.     has been releasing and supporting freely redistributable software,
  244.     he has NEVER ONCE been bitten by a bogus bug report generated by
  245.     someone breaking his code because they had access to it.  Rather,
  246.     he and many other open software provided (where open software
  247.     means that for which the source is provided, the only truly open
  248.     software) have saved themselves countless hours of labor thousands
  249.     of times over because they've allowed people to inspect the source
  250.     for themselves.  Proprietary source-code hoarding is its own
  251.         headache. 
  252.  
  253.     Thus, obscurity for the sake of maintainability would seem to be a
  254.     red herring.
  255.  
  256.     6)  If you can't count on perl being installed at the destination
  257.         customer, then by all means, merely ship it with your program.
  258.         This is no hardship, since software providers are accustomed to
  259.         shipping software in machine-specific binary form.  The basic idea
  260.         is as simple as: 
  261.  
  262.         shar /usr/local/{lib,bin,man}/perl myprog
  263.  
  264.     Although don't overwrite their own Perl installation if they have
  265.         one! 
  266.  
  267.  
  268. 3.6) Where can I get a perl-mode for emacs?
  269.  
  270.     Since Emacs version 19 patchlevel 22 or so, there has been both a
  271.     perl-mode.el and support for the perl debugger built in.  These should
  272.     come with the standard Emacs 19 distribution.
  273.  
  274.     In the perl source directory, you'll find a directory called
  275.     "emacs", which contains several files that should help you.
  276.  
  277.     Note that the perl-mode of emacs will have fits with "main'foo" (single
  278.     quote), and mess up the indention and hilighting.  However, note that
  279.     in perl5, you should be using "main::foo".  By the way, did we mention
  280.     that you should upgrade?
  281.  
  282.  
  283. 3.7) Is there a Perl shell? 
  284.     
  285.     Not really.  Perl is a programming language, not a command
  286.     interpreter.  There is a very simple one called "perlsh"
  287.     included in the Perl source distribution.  It just does this:
  288.  
  289.     $/ = '';        # set paragraph mode
  290.     $SHlinesep = "\n";
  291.     while ($SHcmd = <>) {
  292.         $/ = $SHlinesep;
  293.         eval $SHcmd; print $@ || "\n";
  294.         $SHlinesep = $/; $/ = '';
  295.     }
  296.  
  297.     Not very interesting, eh?  
  298.  
  299.     Daniel Smith <dls@best.com> is working on an interactive Perl shell
  300.     called SoftList.  It's currently at version 3.0b7a (beta).  SoftList 
  301.     3.0b7a has tcsh-like command line editing, can let you define a file of
  302.     aliases so that you can run chunks of perl or UNIX commands, and so
  303.     on.  You can pick up a copy at ftp.best.com in
  304.     /pub/dls/SoftList-3.0b7a.gz. 
  305.  
  306.  
  307. 3.8) How can I use curses with perl?
  308.  
  309.     In release 4 of perl, the only way to do this was was to build a
  310.     curseperl binary by linking in your C curses library as described in
  311.     the usub subdirectory of the perl sources.  This requires a modicum of
  312.     work, but it will be reasonably fast since it's all in C (assuming you
  313.     consider curses reasonably fast. :-) Programs written using this
  314.     method require the modified curseperl, not vanilla perl, to run.
  315.     While this is something of a disadvantage, experience indicates that
  316.     it's better to use curseperl than to try to roll your own using
  317.     termcap directly.
  318.  
  319.     Fortunately, in version 5, Curses is a dynamically loaded extension
  320.     by William Setzer*.  You should be able to pick it up wherever you
  321.     get Perl 5 from, or at least these places:
  322.  
  323.     ftp://ftp.ncsu.edu/pub/math/wsetzer/cursperl5a6.tar.gz
  324.         ftp://ftp.metronet.com/pub/perlinfo/perl5/cursperl5a6.tar.gz
  325.         ftp://ftp.cs.ruu.nl/pub/PERL/perl5.0/cursperl5a6.tar.gz
  326.  
  327.     For a good example of using (v4) curseperl, you might want to pick up a
  328.     copy of  Steven L Kunz's* "perl menus" package ("menu.pl") via
  329.     anonymous FTP from "ftp.iastate.edu".  It's in the /pub/perl as
  330.  
  331.         menu.pl.v3.0.1.tar.Z
  332.  
  333.     menu.pl is a complete menu front-end for perl+curses and demonstates
  334.     a lot of things (plus it is useful to boot if you want full-screen
  335.     menu selection ability).  It provides full-screen menu selection
  336.     ability for three menu styles (single-selection, multiple-selection,
  337.     and "radio-button").
  338.  
  339.     New in version 3.0 is a provision for full-screen data entry.  A
  340.     "template" concept is implemented to create a simple (yet flexible)
  341.     perl interface for building data entry screens for registration,
  342.     database, or other record-oriented tasks.
  343.  
  344.     Version 3.0 of menu.pl is supported on Perl4/curseperl and
  345.     Perl5/Curses.  Complete user documentation is provided along with
  346.     several demos and "beginner applications".  A menu utility module is
  347.     provided that is a collection of useful perl curses routines (such as
  348.     "pop-up" query boxes) that may be called from your applications.
  349.  
  350.     Another possibility is to use Henk Penning's cterm package, a curses
  351.     emulation library written in perl.  cterm is actually a separate
  352.     program with which you communicate via a pipe.  It is available from
  353.     ftp.cs.ruu.nl [131.211.80.17] via anonymous ftp. in the directory
  354.     pub/PERL.  You may also acquire the package via email in compressed,
  355.     uuencoded form by sending a message to mail-server@cs.ruu.nl
  356.     containing these lines:
  357.  
  358.     begin
  359.     send PERL/cterm.shar.Z
  360.     end
  361.  
  362.     See the question on retrieving perl via mail for more information on
  363.     how to retrieve other items of interest from the mail server
  364.     there.
  365.  
  366.  
  367. 3.9) How can I use X with Perl?
  368.  
  369.     Right now, you have several choices.  If you are still using perl4, use
  370.     the WAFE or STDWIN packages, or try to make your own usub binding.
  371.  
  372.     However, if you've upgraded to version 5, you have several exciting
  373.     possibilities, with more popping up each day.  Right now, Tk and Sx
  374.     are the best known such extensions.
  375.  
  376.     If you like the tk package, you should get the Tk extension kit,
  377.     written by Nick Ing-Simmons*.  The official distribution point is at
  378.  
  379.         ftp://ftp.wpi.edu/perl5/private/Tk-b1.tar.gz
  380.  
  381.     This package replaced the tkperl5 project, by Malcolm Beattie*, which
  382.     was based on an older version of Tk, 3.6 as compared to the current
  383.     4.X.  This package was also known as nTk (new Tk) while it was in the
  384.     alpha stages, but has been changed to just Tk now that it is in beta.
  385.     Also, be advised that you need at least perl5.001 (preferably 5.002,
  386.     when it becomes available) and the official unofficial patches.
  387.  
  388.     You may also use the old Sx package, (Athena & Xlib), written by
  389.     originally written by by Dominic Giampaolo*, then and rewritten for Sx
  390.     by Frederic Chauveau*.fr>.  It's available from these sites:
  391.  
  392.         ftp://ftp.pasteur.fr/pub/Perl/Sx.tar.gz
  393.         ftp://ftp.khoros.unm.edu/pub/perl/extensions/Sx.tar.gz
  394.         ftp://ftp.metronet.com/pub/perlinfo/perl5/Sx.tar.gz
  395.  
  396.     STDWIN is a library written by Guido van Rossum* (author of the Python
  397.     programming language) that is portable between Mac, Dos and X11.  One
  398.     could write a Perl agent to speak to this STDWIN server.
  399.  
  400.     WAFE is a package that implements a symbolic interface to the Athena
  401.     widgets (X11R5). A typical Wafe application consists in our framework
  402.     of two parts: the front-end (we call it Wafe for Widget[Athena]front
  403.     end) and an application program running typically as a separate
  404.     process.  The application program can be implemented in an arbitrary
  405.     programming language and talks to the front-end via stdio.  Since Wafe
  406.     (the front-end) was developed using the extensible TCL shell (cite John
  407.     Ousterhout), an application program can dynamically submit requests to
  408.     the front-end to build up the graphical user interface; the
  409.     application can even down-load application specific procedures into
  410.     the front-end.  The distribution contains sample application programs
  411.     in Perl, GAWK, Prolog, TCL, and C talking to the same Wafe binary.
  412.     Many of the demo applications are implemented in Perl.  Wafe 0.9 can
  413.     be obtained via anonymous ftp from 
  414.     ftp.wu-wien.ac.at[137.208.3.5]:pub/src/X11/wafe-0.9.tar.Z
  415.  
  416.     Alternatively, you could use wish from tcl. 
  417.  
  418.     #!/usr/local/bin/perl
  419.     #####################################################################
  420.     #  An example of calling wish as a subshell under Perl and
  421.     #  interactively communicating with it through sockets.
  422.     #
  423.     #  The script is directly based on Gustaf Neumann's perlwafe script.
  424.     #
  425.     #  Dov Grobgeld dov@menora.weizmann.ac.il
  426.     #  1993-05-17
  427.     #####################################################################
  428.  
  429.     $wishbin = "/usr/local/bin/wish";
  430.  
  431.     die "socketpair unsuccessful: $!!\n" unless socketpair(W0,WISH,1,1,0);
  432.     if ($pid=fork) {
  433.         select(WISH); $| = 1;
  434.         select(STDOUT);
  435.  
  436.     # Create some TCL procedures
  437.         print WISH 'proc echo {s} {puts stdout $s; flush stdout}',"\n";
  438.  
  439.     # Create the widgets
  440.     print WISH <<TCL;
  441.     # This is a comment "inside" wish
  442.  
  443.     frame .f -relief raised -border 1 -bg green
  444.     pack append . .f {top fill expand}
  445.  
  446.     button .f.button-pressme -text "Press me" -command {
  447.         echo "That's nice."
  448.     }
  449.     button .f.button-quit -text quit -command {
  450.         echo "quit"
  451.     }
  452.     pack append .f .f.button-pressme {top fill expand} \\
  453.                .f.button-quit {top expand}
  454.  
  455. TCL
  456.     ;
  457.     # Here is the main loop which receives and sends commands
  458.     # to wish.
  459.     while (<WISH>) {
  460.         chop;
  461.         print "Wish sais: <$_>\n";
  462.         if (/^quit/) { print WISH "destroy .\n"; last; }
  463.     }
  464.         wait;
  465.     } elsif (defined $pid) {
  466.     open(STDOUT, ">&W0");
  467.     open(STDIN, ">&W0");
  468.     close(W0);
  469.     select(STDOUT); $| = 1;
  470.     exec "$wishbin --";
  471.     } else {
  472.     die "fork error: $!\n";
  473.     }
  474.  
  475.  
  476. 3.10) Can I dynamically load C user routines?
  477.  
  478.     Yes -- dynamic loading comes with the distribution.  That means that
  479.     you no longer need 18 different versions of fooperl floating around.
  480.     In fact, all of perl can be stuck into a libperl.so library and
  481.     then your /usr/local/bin/perl binary reduced to just 50k or so.
  482.     See DynLoader(3pm) for details.
  483.  
  484.     In perl4, the answer is kinda.  One package has been released that does
  485.     this, by Roberto Salama*.  He writes:
  486.  
  487.     Here is a version of dylperl, dynamic linker for perl. The code here is
  488.     based on Oliver Sharp's May 1993 article in Dr. Dobbs Journal (Dynamic
  489.     Linking under Berkeley UNIX). 
  490.  
  491.           dyl.h 
  492.           dyl.c - code extracted from Oliver Sharp's article
  493.  
  494.           hash.h
  495.           hash.c - Berkeley's hash functions, should use perl's but
  496.                could not be bothered
  497.  
  498.        dylperl.c - perl usersubs
  499.           user.c - userinit function
  500.  
  501.         sample.c - sample code to be dyl'ed
  502.        sample2.c -          "
  503.          test.pl - sample perl script that dyl's sample*.o
  504.  
  505.     The Makefile assumes that uperl.o is in /usr/local/src/perl/... You
  506.     will probably have to change this to reflect your installation. Other
  507.     than that, just type 'make'...
  508.  
  509.     The idea behind being able to dynamically link code into perl is that
  510.     the linked code should become perl functions, i.e. they can be invoked
  511.     as &foo(...).  For this to happen, the incrementally loaded code must
  512.     use the perl stack, look at sample.c to get a better idea.
  513.  
  514.     The few functions that make up this package are outlined below.
  515.  
  516.     &dyl("file.o"): dynamically link file.o. All functions and non-static
  517.            variables become visible from within perl. This
  518.            function returns a pointer to an internal hash table
  519.            corresponding to the symbol table of the newly loaded
  520.            code.
  521.  
  522.            eg: $ht = &dyl("sample.o")
  523.  
  524.        This function can also be called with the -L and -l ld options.
  525.  
  526.            eg: $ht = &dyl(""sample2.o", "-L/usr/lib", "-lm")
  527.                will also pick up the math library if sample.o
  528.                accesses any symbols there.
  529.  
  530.     &dyl_find("func"): find symbol 'func' and return its symbol table entry
  531.  
  532.     &dyl_functions($ht): print the contents of the internal hash table
  533.     &dyl_print_symbols($f): prints the contents of the symbol returned by
  534.     dyl_find() 
  535.  
  536.     There is very little documentation, maybe something to do for a future
  537.     release.  The files sample.o, and sample2.o contain code to be
  538.     incrementally loaded, test.pl is the test perl script.
  539.  
  540.     Comments are welcome. I submit this code for public consumption and,
  541.     basically, am not responsible for it in any way.
  542.  
  543.  
  544. 3.11) What is undump and where can I get it?
  545.  
  546.     The undump program comes from the TeX distribution.  If you have TeX,
  547.     then you may have a working undump.  If you don't, and you can't get
  548.     one, *AND* you have a GNU emacs working on your machine that can clone
  549.     itself, then you might try taking its unexec() function and compiling
  550.     Perl with -DUNEXEC, which will make Perl call unexec() instead of
  551.     abort().  You'll have to add unexec.o to the objects line in the
  552.     Makefile.  If you succeed, post to comp.lang.perl about your experience
  553.     so others can benefit from it. 
  554.  
  555.     If you have a version of undump that works with Perl, please submit
  556.     its anon-FTP whereabouts to the FAQ maintainer.
  557.  
  558.  
  559. 3.12) How can I get '#!perl' to work under MS-DOS?
  560.  
  561.     John Dallman* has written a program "#!perl.exe" which will do this.
  562.     It is available through anonymous ftp from ftp.ee.umanitoba.ca in the
  563.     directory /pub/msdos/perl/hbp_20.zip.  This program works by finding
  564.     the script and perl.exe, building a command line and running perl.exe
  565.     as a child process.  For more information on this, contact John
  566.     directly.
  567. --
  568. Stephen P Potter        spp@vx.com        Varimetrix Corporation
  569. 2350 Commerce Park Drive, Suite 4                Palm Bay, FL 32905
  570. (407) 676-3222                           CAD/CAM/CAE/Software
  571.